package com.bifang.core.dao.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 操作期设置表
 *
 * @author chenzh
 * @since 2020-09-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("OPERATION_PERIOD")
@ApiModel(value = "OperationPeriod对象", description = "操作期设置表")
public class OperationPeriod extends Model<OperationPeriod> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "操作期id")
    @TableId(value = "PERIOD_ID", type = IdType.AUTO)
    private Long periodId;

    @ApiModelProperty(value = "操纵期控制规则")
    @TableField("OPERATING")
    private String operating;

    @ApiModelProperty(value = "所属年度")
    @TableField("PERIOD_YEAR")
    private Integer periodYear;

    @ApiModelProperty(value = "业务年月")
    @TableField("YM")
    private Integer ym;

    @ApiModelProperty(value = "开始时间")
    @TableField("BEG_TIME")
    private Date begTime;

    @ApiModelProperty(value = "结束时间")
    @TableField("END_TIME")
    private Date endTime;

    @ApiModelProperty(value = "所属期id")
    @TableField("PERIOD_SAME_ID")
    private Long periodSameId;

    @ApiModelProperty(value = "操纵期控制规则名称")
    @TableField("OPERATING_NAME")
    private String operatingName;

    @ApiModelProperty(value = "业务所属行政区划")
    @TableField("AREA_CODE")
    private String areaCode;

    @ApiModelProperty(value = "应用id")
    @TableField("CLIENT_ID")
    private String clientId;

    @ApiModelProperty(value = "组织id")
    @TableField("ORG_ID")
    private String orgId;

    @ApiModelProperty(value = "备注")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "创建人")
    @TableField(
            value = "CREATE_NAME",
            fill = FieldFill.INSERT,
            updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @ApiModelProperty(value = "创建时间")
    @TableField(
            value = "CREATE_TIME",
            fill = FieldFill.INSERT,
            updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @ApiModelProperty(value = "修改人")
    @TableField(
            value = "UPDATE_NAME",
            fill = FieldFill.INSERT_UPDATE,
            updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @ApiModelProperty(value = "更新时间")
    @TableField(
            value = "UPDATE_TIME",
            fill = FieldFill.INSERT_UPDATE,
            updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @ApiModelProperty(value = "逻辑删除标志 0 正常 1 删除")
    @TableField(value = "DEL", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.periodId;
    }
}
